package com.h2o3.carmack.network;

import org.glassfish.grizzly.http.HttpRequestPacket;
import org.glassfish.grizzly.websockets.Broadcaster;
import org.glassfish.grizzly.websockets.DefaultWebSocket;
import org.glassfish.grizzly.websockets.ProtocolHandler;
import org.glassfish.grizzly.websockets.WebSocketListener;

import com.h2o3.carmack.session.Session;
import com.h2o3.carmack.session.SessionFactory;

/**
 * @author chensheng
 * @version $Id: CarmackWebSocket.java, v 0.1 1/18/14 9:18 PM chensheng Exp $
 */
public class CarmackWebSocket extends DefaultWebSocket {
    private Session session;

    public CarmackWebSocket(ProtocolHandler protocolHandler, HttpRequestPacket request,
                            Broadcaster broadcaster, WebSocketListener... listeners) {
        super(protocolHandler, request, listeners);
        this.setBroadcaster(broadcaster);
    }

    public Session getSession() {
        return session;
    }

    protected void setSession(Session session) {
        this.session = session;
    }
}
